<template>
	<view class="setting">
		<view class="header">
			<view class="out">
				<u-icon name="arrow-left" size="25" @click="goout"></u-icon>
			</view>
			<view class="class-list">我的设置</view>
		</view>
		<view class="box">
			<view class="zh">
				<view class="a1">账户安全</view>
				<view class="a2">
					<u-icon name="arrow-right" size="20"></u-icon>
				</view>
			</view>
			<view class="clear">
				<view class="a1">清除缓存</view>
				<view class="a2">
					2.00KB
				</view>
			</view>
			<view class="jc">
				<view class="a1">检查更新</view>
				<view class="a2">
					<u-icon name="arrow-right" size="20"></u-icon>
				</view>
			</view>
			<view class="dq">
				<view class="a1">当前版本</view>
				<view class="a2">
					1.00KB
				</view>
			</view>
		</view>
		<u-button type="success" class='btn' @click="tc" >退出登录</u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},

		onLoad() {

		},
		methods: {
			// 点击退出
			goout() {
				uni.navigateBack({
					url: '/pages/my/my'
				})
			},
			//退出登录
			tc(){
				uni.removeStorageSync('token')
				uni.showToast({
					title:'退出成功'
				})
			}
		}
	}
</script>

<style lang="less">
	.setting {
		.header {
			width: 100%;
			height: 100rpx;
			line-height: 100rpx;
			display: flex;
			flex-direction: row;

			.out {
				flex: 1;
				padding-left: 20rpx;
				padding-top: 27rpx;
			}

			.class-list {
				flex: 3;
				font-size: 38rpx;
				font-weight: 600;
				margin-left: 120rpx;
			}
		}

		.box {
			width: 100%;
			height: 380rpx;
			display: flex;
			flex-direction: column;

			.zh {
				flex: 1;
				line-height: 90rpx;
				box-sizing: border-box;
				padding: 0 20rpx;
				display: flex;
				flex-direction: row;

				.a1 {
					flex: 5;
				}

				.a2 {
					flex: 0.7;
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}

			.clear {
				flex: 1;
				line-height: 90rpx;
				box-sizing: border-box;
				padding: 0 20rpx;
				display: flex;
				flex-direction: row;

				.a1 {
					flex: 5;
				}

				.a2 {
					flex: 1;
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}

			.jc {
				flex: 1;
				line-height: 90rpx;
				box-sizing: border-box;
				padding: 0 20rpx;
				display: flex;
				flex-direction: row;
				.a1 {
					flex: 5;
				}
				
				.a2 {
					flex: 0.7;
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}

			.dq {
				flex: 1;
				line-height: 90rpx;
				box-sizing: border-box;
				padding: 0 20rpx;
				display: flex;
				flex-direction: row;
               .a1 {
               	flex: 5;
               }
               
               .a2 {
               	flex: 1;
               	display: flex;
               	justify-content: center;
               	align-items: center;
               }
			}
		}
		.btn{
			width: 95%;
			margin: auto;
			margin-top: 20rpx;
		}
	}
</style>
